package ar.edu.unicen.exa.oop.bbquery.model.forum.topic;

import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;

import javax.persistence.Entity;

/**
 * Topic with sub-topics. (category or forum ...)
 * 
 * @author nicolas
 */
@Entity
public class CompositeTopic extends Topic implements Serializable {

	private static final long serialVersionUID = -5179633035544220113L;
	private LinkedList<Topic> subTopics;

	private String title;

	public CompositeTopic(String title, String description, int topicNumber,
			LinkedList<Topic> t) {
		super(description, topicNumber);
		setSubTopics(t);
		this.title = title;
	}

	void setSubTopics(LinkedList<Topic> topics) {
		this.subTopics = topics;
	}

	List<Topic> getSubTopics() {
		return subTopics;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

}
